import * as req from '@/request';


export async function all() {
  return await req.get<API.ServerSupplierList>('/serversupplier/all');
}

export async function list(
  params: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.ServerSupplierList>(
    '/serversupplier/list',
    params,
    sorter,
    filter,
  );
}

export async function add(data: { [key: string]: any }) {
  return req.postForm<API.Result>('/serversupplier/create', data);
}

export async function update(data: { [key: string]: any }) {
  return req.postForm<API.Result>('/serversupplier/update', data);
}

export async function remove(data: { key: number }) {
  return req.post<API.Result>('/serversupplier/delete', data);
}

